Skip to content

Fix zero video composition frame duration#2

Merged
ua741 merged 1 commit into
ente:ios_video_crashfrom
neeraj-pilot:fix-video-player-avfoundation-zero-frame-duration
May 18, 2026
Merged

Fix zero video composition frame duration#2
ua741 merged 1 commit into
ente:ios_video_crashfrom
neeraj-pilot:fix-video-player-avfoundation-zero-frame-duration

Conversation

@neeraj-pilot

@neeraj-pilot neeraj-pilot commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Treat zero AVAssetTrack.minFrameDuration as invalid before assigning AVMutableVideoComposition.frameDuration.
  • Keep the existing 30 FPS fallback for invalid or non-positive frame durations.

Validation

  • Ran git diff --check.

Context

Some Pixel .LS.mp4 files can report minFrameDuration as 0/90000. CMTIME_IS_VALID accepts that value, but AVFoundation requires videoComposition.frameDuration to be positive and throws when the composition is assigned to AVPlayerItem.

@ua741 ua741 merged commit e6f7518 into ente:ios_video_crash May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants